368bca
@@ -350,7 +350,7 @@
private void joinFinalLeftData() throws HiveException {
       joinOneGroup();
       dataInCache = false;
       for (byte pos = 0; pos < order.length; pos++) {
-        if (this.candidateStorage[pos].hasRows()) {
+        if (this.candidateStorage[pos] != null && this.candidateStorage[pos].hasRows()) {
           dataInCache = true;
           break;
         }
